<?php
Class SgpageModel extends Model{
	Public function addSgpage(){
		$data = array(
			'title' => Q('title'),
			'etitle' => Q('etitle'),
			'content' => Q('content')
			);
		if(empty($data['title'])){
			return false;
		}else{
			return $this->add($data);
		}
	}

	Public function editSgpage(){
		$data = array(
			'id' => Q('id',0,'intval'),
			'title' => Q('title'),
			'etitle' => Q('etitle'),
			'content' => Q('content')
			);
		if(empty($data['title'])){
			return false;
		}else{
			return $this->save($data);
		}
	}
}